Skip to content

fix(desktop): suppress console window flashes from background spawns on Windows#2493

Open
adamentwistle wants to merge 1 commit into
block:mainfrom
adamentwistle:windows-no-console-flash
Open

fix(desktop): suppress console window flashes from background spawns on Windows#2493
adamentwistle wants to merge 1 commit into
block:mainfrom
adamentwistle:windows-no-console-flash

Conversation

@adamentwistle

Copy link
Copy Markdown

Fixes #2490

On Windows, every std::process::Command spawn of a console-subsystem binary
(git, node, ffmpeg, agent CLIs) opens a visible console window unless the
CREATE_NO_WINDOW process-creation flag is set. The desktop app spawns these
in the background constantly — git exec, agent runtime readiness/version
probes, auth status probes, ffmpeg transcodes, provider invocations — so black
console windows flash over the UI throughout normal use.

Change

Set the CREATE_NO_WINDOW creation flag (0x0800_0000) on all background
spawn sites under desktop/src-tauri, guarded by #[cfg(windows)] via
std::os::windows::process::CommandExt:

  • commands/project_git_exec.rsrun_git
  • commands/agent_discovery/managed_node.rs — managed node --version probe
  • commands/agent_model_process.rs — agent models listing
  • commands/agent_auth.rs — ACP auth command + Claude subscription login
  • commands/media_transcode.rs — ffmpeg command builder + test fixture generation
  • commands/relay_reconnect.rsrun_with_timeout
  • managed_agents/backend.rsinvoke_provider
  • managed_agents/discovery.rs — login-shell probe, auth status probe, codex ACP version probe
  • managed_agents/agent_env.rs — env probe tests

No new dependencies. No behavior change on non-Windows platforms (the flag is
compiled out). Interactive/foreground spawns are untouched.

Testing

  • cargo check passes on Windows (MSVC, Rust 1.95.0) with no new warnings vs a
    clean-upstream baseline.
  • Running this patch daily on a source build of v0.4.23 on Windows 11 Pro 25H2:
    the constant console-window flashes are gone; git operations, agent
    discovery, auth probes, and transcodes all still work.

@adamentwistle
adamentwistle requested a review from a team as a code owner July 23, 2026 09:30
…on Windows

On Windows, every std::process::Command spawn of a console-subsystem
binary (git, node, ffmpeg, agent CLIs) opens a visible console window
unless CREATE_NO_WINDOW is set. The desktop app spawns these in the
background constantly — git exec, agent runtime readiness/version
probes, auth status probes, ffmpeg transcodes, provider invocations —
so windows flash over the UI throughout normal use.

Set the CREATE_NO_WINDOW creation flag (0x08000000) on all background
spawn sites under desktop/src-tauri. Guarded by #[cfg(windows)]; no
behavior change on other platforms. Interactive/foreground spawns are
untouched.

Signed-off-by: Adam <adam@optaimi.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows: background process spawns flash visible console windows over the UI

1 participant